package ${package.domain}.entity;

<#list table.importPackages as pkg>
    <#if pkg?contains("mybatisplus")>
    <#else>
import ${pkg};
    </#if>
</#list>
import ${package.common}.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Objects;

/**
 * ${table.comment!}实体
 *
 * @author ${author}
 * @since ${date}
 */
@Getter
@Setter
@ToString
public class ${entity} extends BaseEntity<${idPropertyType}> {
<#list table.fields as field>

    <#if field.keyFlag>
    <#-- 普通字段 -->
    <#else>
    /**
     * ${field.comment}
     */
    private ${field.propertyType} ${field.propertyName};
    </#if>
</#list>

    /**
     * 检查租户和当前用户租户是否一致
     *
     * @return true:一致;false:不一致
     */
    public boolean checkTenant() {
        // 获取当前用户
        //SecurityUser securityUser = SecurityUserHelper.get();
        //return Objects.equals(this.getTenantId(), securityUser.getTenantId());
        return true;
    }
}
